<?php
include_once('admin-load.php');
	$shippers_id = isset($_REQUEST['shippers_id'])?$_REQUEST['shippers_id']:null;
        $shippers='';
     if ($shippers_id) {
            
            $shippers = $dbna->get_row("SELECT * FROM shippers WHERE id = $shippers_id ");
            
     }

   if (isset($_POST['submit_form'])) {
        update_shippers();
    }
?> 
<?php
	include_once 'header.php';
?>
            <div id="main_content">
                <div id="content">
                    
				</div>
					<div class="container">
            <h5>Update shipper</h5>

					</div>
				<div id="main">
                    <h2>Create New shipper</h2>
                    <form id="add_user" action="shipper-edit.php" method="post">
                        <input type="hidden" value="1" name="submit_form"/>
                        <input type="hidden" value="<?php echo $shippers_id ?>" name="shipper_id" />
                        <fieldset>
                            <legend>Form edit new shippers  </legend>
                        <div>
                            <label for="sender_name">Sender name : </label>
                            <input type="text" id="sender_name" name="sender_name" value="<?php echo $shippers->sender_name?>"/>
                        </div>
                        <div>
                            <label for="address">address : </label>
                            <input type="text" id="address" name="address" value="<?php echo $shippers->address?>"/>
                        </div>
                        <div>
                            <label for="sent">Sent date : </label>
                            <input type="text" id="sent" name="sent" class="datepicker" value="<?php echo $shippers->sent?>"/>
                        </div>
                        <div>
                            <label for="receive_name">receive name : </label>
                            <input type="text" id="receive_name" name="receive_name" value="<?php echo $shippers->receive_name?>"/>
                        </div>
                        <div>
                            <label for="receive_date">Received date : </label>
                            <input type="text" id="receive_date" class="datepicker" name="receive_date"value="<?php echo $shippers->receive_date?>"/>
                        </div>
                        <div>
                            <label for="phone">phone : </label>
                            <input type="text" id="phone" name="phone" value="<?php echo $shippers->phone?>"/>
                        </div>
                            <div>
                            <label for="fax">Fax : </label>
                            <input type="text" id="fax" name="fax" value="<?php echo $shippers->fax?>"/>
                        </div>
                            <div>
                            <label for="country">country : </label>
                            <?php echo countrySelect($shippers->country) ?>
                            </div>
                            <div>
                            <label for="zip">Zip: </label>
                            <input type="text" id="zip" name="zip" value="<?php echo $shippers->zip?>"/>
                            </div>
                         
                            <div>
                                <input type="submit" value="Update" name="submit"/>
                            </div>
                        
                              
                        </div>
                    </form>
                </div>
            </div>
            <script>
	$(function() {
		$( ".datepicker" ).datepicker({dateFormat:"yy-mm-dd"});
	});
	</script>
<?php 
	include_once 'footer.php';
?>